// 图片资源统一导出

// 浏览器图标
export const browserIcons = {
    chrome: '/src/assets/img/chrome/Google Chrome.png',
    edge: '/src/assets/img/chrome/edge.png',
    firefox: '/src/assets/img/chrome/Firefox.png',
    safari: '/src/assets/img/chrome/safari.png'
}

// 操作系统图标
export const osIcons = {
    android: '/src/assets/img/os/Android-OS.png',
    windows: '/src/assets/img/os/Windows-OS.png',
    macos: '/src/assets/img/os/Mac-OS.png',
    harmony: '/src/assets/img/os/harmonyOS_logo.png',
    ios: '/src/assets/img/os/ios.png',
    linux: '/src/assets/img/os/linux.png'
}

// 设备类型图标
export const deviceIcons = {
    mobile: '/src/assets/img/device/smartphone.png',
    pc: '/src/assets/img/device/workstation.png',
    pad: '/src/assets/img/device/ipad.png',
    tablet: '/src/assets/img/device/ipad.png' // 平板设备使用ipad图标
}

// 网络类型图标
export const networkIcons = {
    broadband: '/src/assets/img/network/无线上网.png',
    mobile: '/src/assets/img/network/蜂窝网络.png',
    wifi: '/src/assets/img/network/无线上网.png',
    wireless: '/src/assets/img/network/无线上网.png'
}

export const logoIcons = {
    logo: '/src/assets/img/other/橘猫.png'
}

// 获取浏览器图标
export const getBrowserIcon = (browser: string): string => {
    return browserIcons[browser as keyof typeof browserIcons] || browserIcons.chrome
}

// 获取操作系统图标
export const getOsIcon = (os: string): string => {
    return osIcons[os as keyof typeof osIcons] || osIcons.windows
}

// 获取设备类型图标
export const getDeviceIcon = (device: string): string => {
    return deviceIcons[device as keyof typeof deviceIcons] || deviceIcons.pc
}

// 获取网络类型图标
export const getNetworkIcon = (network: string): string => {
    return networkIcons[network as keyof typeof networkIcons] || networkIcons.broadband
}

export const getLogoIcon = () => {
    return logoIcons.logo
}
